package com.ylyq.ylxx.service.impl;

import com.ylyq.ylxx.entity.YlyqCoverMessage;
import com.ylyq.ylxx.mapper.YlyqCoverMessageMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ylyq.ylxx.model.request.SaveYlyqCoverMessageRequest;
import com.ylyq.ylxx.service.IYlyqCoverMessageService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xiaweichao
 * @since 2020-10-30
 */
@Service
public class IYlyqCoverMessageServiceImpl extends ServiceImpl<YlyqCoverMessageMapper, YlyqCoverMessage> implements IYlyqCoverMessageService {

    @Autowired
    private YlyqCoverMessageMapper ylyqCoverMessageMapper;

    @Override
    public Integer submit(SaveYlyqCoverMessageRequest saveYlyqCoverMessageRequest){
        YlyqCoverMessage ylyqCoverMessage =  new YlyqCoverMessage();
        BeanUtils.copyProperties(saveYlyqCoverMessageRequest,ylyqCoverMessage);
        return ylyqCoverMessageMapper.insert(ylyqCoverMessage);
    }
}
